package Studing;

/**
 * @ClassName Overide
 * @Description: TODO
 * @Author hl
 * @Date 2020/9/10
 * @Version V1.0
 **/
public class OverideModal {
    private int x;
    private  int y;
    private  int z;

    public OverideModal(int x, int y, int z) {
        this.x = x;
        this.y = y;
        this.z = z;
    }

    @Override
    public boolean equals(Object e){
        if(this==e){
            return  true;
        }
        if(e==null||getClass()!=e.getClass()){
            return  false;
        }
        OverideModal target=(OverideModal) e;
        if(x!=target.x) return false;
        if(y!=target.y) return false;
        return  z==target.z;
    }

    @Override
    public int  hashCode(){
        int res=17;
        res=res*31+x;
        res=res*31+y;
        res=res*31+z;
        return  res;
    }

}
